package cn.xyf.eduservice.controller;

import cn.xyf.commonutils.R;
import cn.xyf.eduservice.domain.vo.CourseInfoVo;
import cn.xyf.eduservice.service.EduCourseService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 课程 前端控制器
 *
 * @author xuyinfeng
 * @since 2021-04-30
 */
@Api(tags = "课程管理模块")
@RestController
@RequestMapping("/eduservice/course")
@CrossOrigin
public class EduCourseController {

  @Autowired
  private EduCourseService eduCourseService;
  @ApiOperation("添加课程分类")
  @PostMapping("/addCourse")
  public R addCourse(@RequestBody CourseInfoVo courseInfoVo) {
    eduCourseService.saveCourseInfo(courseInfoVo);
    return R.ok();
  }
}
